extends "../jiaweisi-3/jiaweisi-3.gd"


var baseId = ""
var upText1 = "赴难赋予的负面效果层数+5"
var upText2 = "回响冷却时间-2秒"
func _extInit():
	._extInit()
	lv = 4             #等级的设置
	addSkill("<固化><唯一>每10秒触发我方所有单位的亡语效果", "回响")
var p4 = 10
var skIndex4 = 0
func _upS():
	._upS()
	skIndex4 += 1
	if skIndex4 >= p4:
		skIndex4 = 0
		jiaweisi4()

func jiaweisi4():
	utils.createSkillTextEff("回响", position)
	for i in getAllChas(2):
		if i.has_method("deathWord"):
			i.deathWord()
		for j in i.items:
			if j.has_method("deathWord") and sys.rndPer(50):
				j.deathWord()

func _onBattleEnd():
	._onBattleEnd()
	skIndex4 = 0

func upgrade():
	.upgrade()
	if upgraded == 1:
		p2 = 15
	if upgraded == 2:
		p4 = 8